#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include "ConfProto.h"
#include "tblutil.h"
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\CDT.h>



static void *storeFromStruct;

static int recordNum;
void registerCDT(void *ptr)
{
	 storeFromStruct = ptr;
}

void *dealWithAddressBoundary(void*address);
int	inLoadCDTRecFromStruct (int inRecNumber, void *vdStruct)
{
	int inRet;
	char* tmp = (char*)vdStruct;

	registerCDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	inRet = inLoadConfRec(CDT_FILENAME, SIZE_CDT_REC, inRecNumber, vdStruct);

	recordNum = inRecNumber;
	return inRet;
}

void vdRestoreCDTRecFromStruct(void *vdStruct)
{
	registerCDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	memcpy((char *) pvdGetCDTRec(), vdStruct, SIZE_CDT_REC);

}

void vdCopyCDTRecFromStruct(void *vdStruct)
{
	registerCDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
		memcpy(vdStruct, (char *) pvdGetCDTRec(), SIZE_CDT_REC);

}

int	inSaveCDTRecFromStruct (int inRecNumber,  void *vdStruct)
{
	int inRet;

	registerCDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	inRet = inSaveConfRec(CDT_FILENAME, SIZE_CDT_REC, inRecNumber, (char *) vdStruct);

	return inRet;
}

int	inUpdateCDTRecFromStruct (void *vdStruct)
{
	int inRet;

	registerCDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	inRet = inSaveConfRec(CDT_FILENAME, SIZE_CDT_REC, recordNum, (char *) vdStruct);

	return inRet;
}

char* szGetPANLoFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetPANLo();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szPANLo;
}

void vdSetPANLoFromStruct(const char* szPANLo, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPANLo(szPANLo);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szPANLo, szPANLo, sizeof(((CDT_REC*)NULL)->szPANLo)-1);
}

char* szGetPANHiFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetPANHi();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szPANHi;
}

void vdSetPANHiFromStruct(const char* szPANHi, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPANHi(szPANHi);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szPANHi, szPANHi, sizeof(((CDT_REC*)NULL)->szPANHi)-1);
}

char* szGetSrvENumFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetSrvENum();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szSrvENum;
}

void vdSetSrvENumFromStruct(const char* szSrvENum, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetSrvENum(szSrvENum);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szSrvENum, szSrvENum, sizeof(((CDT_REC*)NULL)->szSrvENum)-1);
}

char* szGetCardAbbrevFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetCardAbbrev();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szCardAbbrev;
}

void vdSetCardAbbrevFromStruct(const char* szCardAbbrev, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCardAbbrev(szCardAbbrev);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szCardAbbrev, szCardAbbrev, sizeof(((CDT_REC*)NULL)->szCardAbbrev)-1);
}

char* szGetCardLabelFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetCardLabel();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szCardLabel;
}

void vdSetCardLabelFromStruct(const char* szCardLabel, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCardLabel(szCardLabel);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szCardLabel, szCardLabel, sizeof(((CDT_REC*)NULL)->szCardLabel)-1);
}

char* szGetTracksRequiredFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetTracksRequired();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szTracksRequired;
}

void vdSetTracksRequiredFromStruct(const char* szTracksRequired, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetTracksRequired(szTracksRequired);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szTracksRequired, szTracksRequired, sizeof(((CDT_REC*)NULL)->szTracksRequired)-1);
}

char* szGetCDTStrDummyFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetCDTStrDummy();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->szCDTStrDummy;
}

void vdSetCDTStrDummyFromStruct(const char* szCDTStrDummy, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTStrDummy(szCDTStrDummy);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((CDT_REC*)vdStruct)->szCDTStrDummy, szCDTStrDummy, sizeof(((CDT_REC*)NULL)->szCDTStrDummy)-1);
}

short inGetTypeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetType();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inType;
}

void vdSetTypeFromStruct(short inType, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetType(inType);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inType = inType;
}

short inGetHostIndexFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetHostIndex();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inHostIndex;
}

void vdSetHostIndexFromStruct(short inHostIndex, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHostIndex(inHostIndex);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inHostIndex = inHostIndex;
}

short inGetHostGroupIDFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetHostGroupID();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inHostGroupID;
}

void vdSetHostGroupIDFromStruct(short inHostGroupID, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHostGroupID(inHostGroupID);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inHostGroupID = inHostGroupID;
}

short inGetMinPANDigitFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetMinPANDigit();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inMinPANDigit;
}

void vdSetMinPANDigitFromStruct(short inMinPANDigit, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetMinPANDigit(inMinPANDigit);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inMinPANDigit = inMinPANDigit;
}

short inGetMaxPANDigitFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetMaxPANDigit();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inMaxPANDigit;
}

void vdSetMaxPANDigitFromStruct(short inMaxPANDigit, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetMaxPANDigit(inMaxPANDigit);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inMaxPANDigit = inMaxPANDigit;
}

short inGetAVSFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetAVS();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inAVS;
}

void vdSetAVSFromStruct(short inAVS, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetAVS(inAVS);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inAVS = inAVS;
}

short inGetIssuerNumFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetIssuerNum();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inIssuerNum;
}

void vdSetIssuerNumFromStruct(short inIssuerNum, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetIssuerNum(inIssuerNum);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inIssuerNum = inIssuerNum;
}

short inGetImamCDTIndexFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetImamCDTIndex();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inImamCDTIndex;
}

void vdSetImamCDTIndexFromStruct(short inImamCDTIndex, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamCDTIndex(inImamCDTIndex);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inImamCDTIndex = inImamCDTIndex;
}

short inGetFPSTypeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetFPSType();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inFPSType;
}

void vdSetFPSTypeFromStruct(short inFPSType, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetFPSType(inFPSType);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inFPSType = inFPSType;
}

short inGetCVV_IIFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetCVV_II();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inCVV_II;
}

void vdSetCVV_IIFromStruct(short inCVV_II, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCVV_II(inCVV_II);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inCVV_II = inCVV_II;
}

short inGetPaymentIndexFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetPaymentIndex();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inPaymentIndex;
}

void vdSetPaymentIndexFromStruct(short inPaymentIndex, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPaymentIndex(inPaymentIndex);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inPaymentIndex = inPaymentIndex;
}

short inGetCDTCustomIntFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetCDTCustomInt();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inCDTCustomInt;
}

void vdSetCDTCustomIntFromStruct(short inCDTCustomInt, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTCustomInt(inCDTCustomInt);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inCDTCustomInt = inCDTCustomInt;
}

short inGetStatusFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetStatus();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->inStatus;
}

void vdSetStatusFromStruct(short inStatus, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetStatus(inStatus);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->inStatus = inStatus;
}

long lnGetTipDiscountFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return lnGetTipDiscount();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->lnTipDiscount;
}

void vdSetTipDiscountFromStruct(long lnTipDiscount, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetTipDiscount(lnTipDiscount);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->lnTipDiscount = lnTipDiscount;
}

long lnGetFloorLimitAmountFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return lnGetFloorLimitAmount();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->lnFloorLimitAmount;
}

void vdSetFloorLimitAmountFromStruct(long lnFloorLimitAmount, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetFloorLimitAmount(lnFloorLimitAmount);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->lnFloorLimitAmount = lnFloorLimitAmount;
}

VS_BOOL fGetCDTCustomBit1FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTCustomBit1();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTCustomBit1;
}

void vdSetCDTCustomBit1FromStruct(VS_BOOL fCDTCustomBit1, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTCustomBit1(fCDTCustomBit1);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTCustomBit1 = fCDTCustomBit1;
}

VS_BOOL fGetCDTCustomBit2FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTCustomBit2();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTCustomBit2;
}

void vdSetCDTCustomBit2FromStruct(VS_BOOL fCDTCustomBit2, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTCustomBit2(fCDTCustomBit2);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTCustomBit2 = fCDTCustomBit2;
}

VS_BOOL fGetCDTCustomBit3FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTCustomBit3();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTCustomBit3;
}

void vdSetCDTCustomBit3FromStruct(VS_BOOL fCDTCustomBit3, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTCustomBit3(fCDTCustomBit3);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTCustomBit3 = fCDTCustomBit3;
}

VS_BOOL fGetCDTCustomBit4FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTCustomBit4();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTCustomBit4;
}

void vdSetCDTCustomBit4FromStruct(VS_BOOL fCDTCustomBit4, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTCustomBit4(fCDTCustomBit4);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTCustomBit4 = fCDTCustomBit4;
}

VS_BOOL fGetCheckProdCodeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCheckProdCode();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCheckProdCode;
}

void vdSetCheckProdCodeFromStruct(VS_BOOL fCheckProdCode, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCheckProdCode(fCheckProdCode);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCheckProdCode = fCheckProdCode;
}

VS_BOOL fGetChkLuhnFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetChkLuhn();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fChkLuhn;
}

void vdSetChkLuhnFromStruct(VS_BOOL fChkLuhn, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetChkLuhn(fChkLuhn);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fChkLuhn = fChkLuhn;
}

VS_BOOL fGetExpDtReqdFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetExpDtReqd();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fExpDtReqd;
}

void vdSetExpDtReqdFromStruct(VS_BOOL fExpDtReqd, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetExpDtReqd(fExpDtReqd);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fExpDtReqd = fExpDtReqd;
}

VS_BOOL fGetManEntryFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetManEntry();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fManEntry;
}

void vdSetManEntryFromStruct(VS_BOOL fManEntry, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetManEntry(fManEntry);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fManEntry = fManEntry;
}

VS_BOOL fGetAllowMultiCurrFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetAllowMultiCurr();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fAllowMultiCurr;
}

void vdSetAllowMultiCurrFromStruct(VS_BOOL fAllowMultiCurr, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetAllowMultiCurr(fAllowMultiCurr);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fAllowMultiCurr = fAllowMultiCurr;
}

VS_BOOL fGetSignLineFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetSignLine();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fSignLine;
}

void vdSetSignLineFromStruct(VS_BOOL fSignLine, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetSignLine(fSignLine);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fSignLine = fSignLine;
}

VS_BOOL fGetCardPresentFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCardPresent();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCardPresent;
}

void vdSetCardPresentFromStruct(VS_BOOL fCardPresent, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCardPresent(fCardPresent);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCardPresent = fCardPresent;
}

VS_BOOL fGetPinpadRequiredFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetPinpadRequired();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fPinpadRequired;
}

void vdSetPinpadRequiredFromStruct(VS_BOOL fPinpadRequired, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPinpadRequired(fPinpadRequired);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fPinpadRequired = fPinpadRequired;
}

VS_BOOL fGetPrntrRequiredFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetPrntrRequired();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fPrntrRequired;
}

void vdSetPrntrRequiredFromStruct(VS_BOOL fPrntrRequired, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPrntrRequired(fPrntrRequired);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fPrntrRequired = fPrntrRequired;
}

VS_BOOL fGetChkServiceCodeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetChkServiceCode();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fChkServiceCode;
}

void vdSetChkServiceCodeFromStruct(VS_BOOL fChkServiceCode, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetChkServiceCode(fChkServiceCode);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fChkServiceCode = fChkServiceCode;
}

VS_BOOL fGetImamSelectAccFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamSelectAcc();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fImamSelectAcc;
}

void vdSetImamSelectAccFromStruct(VS_BOOL fImamSelectAcc, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamSelectAcc(fImamSelectAcc);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fImamSelectAcc = fImamSelectAcc;
}

VS_BOOL fGetImamPrivateLabelFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamPrivateLabel();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fImamPrivateLabel;
}

void vdSetImamPrivateLabelFromStruct(VS_BOOL fImamPrivateLabel, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamPrivateLabel(fImamPrivateLabel);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fImamPrivateLabel = fImamPrivateLabel;
}

VS_BOOL fGetImamSwipe4DBCFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamSwipe4DBC();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fImamSwipe4DBC;
}

void vdSetImamSwipe4DBCFromStruct(VS_BOOL fImamSwipe4DBC, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamSwipe4DBC(fImamSwipe4DBC);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fImamSwipe4DBC = fImamSwipe4DBC;
}

VS_BOOL fGetImamManual4DBCFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamManual4DBC();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fImamManual4DBC;
}

void vdSetImamManual4DBCFromStruct(VS_BOOL fImamManual4DBC, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamManual4DBC(fImamManual4DBC);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fImamManual4DBC = fImamManual4DBC;
}

VS_BOOL fGetCDTSaleFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTSale();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTSale;
}

void vdSetCDTSaleFromStruct(VS_BOOL fCDTSale, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTSale(fCDTSale);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTSale = fCDTSale;
}

VS_BOOL fGetCDTCardVerFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTCardVer();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTCardVer;
}

void vdSetCDTCardVerFromStruct(VS_BOOL fCDTCardVer, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTCardVer(fCDTCardVer);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTCardVer = fCDTCardVer;
}

VS_BOOL fGetCDTAuthOnlyFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTAuthOnly();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTAuthOnly;
}

void vdSetCDTAuthOnlyFromStruct(VS_BOOL fCDTAuthOnly, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTAuthOnly(fCDTAuthOnly);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTAuthOnly = fCDTAuthOnly;
}

VS_BOOL fGetCDTNormPreAuthFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTNormPreAuth();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTNormPreAuth;
}

void vdSetCDTNormPreAuthFromStruct(VS_BOOL fCDTNormPreAuth, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTNormPreAuth(fCDTNormPreAuth);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTNormPreAuth = fCDTNormPreAuth;
}

VS_BOOL fGetCDTOfflineFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTOffline();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTOffline;
}

void vdSetCDTOfflineFromStruct(VS_BOOL fCDTOffline, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTOffline(fCDTOffline);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTOffline = fCDTOffline;
}

VS_BOOL fGetCDTRefundFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTRefund();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTRefund;
}

void vdSetCDTRefundFromStruct(VS_BOOL fCDTRefund, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTRefund(fCDTRefund);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTRefund = fCDTRefund;
}

VS_BOOL fGetCDTTipAdjustFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTTipAdjust();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTTipAdjust;
}

void vdSetCDTTipAdjustFromStruct(VS_BOOL fCDTTipAdjust, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTTipAdjust(fCDTTipAdjust);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTTipAdjust = fCDTTipAdjust;
}

VS_BOOL fGetCDTPreAuthFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTPreAuth();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTPreAuth;
}

void vdSetCDTPreAuthFromStruct(VS_BOOL fCDTPreAuth, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTPreAuth(fCDTPreAuth);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTPreAuth = fCDTPreAuth;
}

VS_BOOL fGetCDTPreCompFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCDTPreComp();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((CDT_REC*)vdStruct)->fCDTPreComp;
}

void vdSetCDTPreCompFromStruct(VS_BOOL fCDTPreComp, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCDTPreComp(fCDTPreComp);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((CDT_REC*)vdStruct)->fCDTPreComp = fCDTPreComp;
}

